﻿/*Copyright (C) 2010-2012 RAAFCOM B.V. All rights reserved.

This file is part of Velsto and may be used under the terms of:
The GNU General Public License version 3 or higher, as published by
the Free Software Foundation.

This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.*/
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;

namespace Velsto
{
    public class XYPointEntity : IComparable
    {
        int x = 0;
        int y = 0;
       
        public XYPointEntity()
        {
            
        }

        public int X
        {
            get { return x; }
            set { x = value; }
        }
        public int Y
        {
            get { return y; }
            set { y = value; }
        }

        public int CompareTo(Object obj)
        {
            XYPointEntity xy2 = obj as XYPointEntity;
            if (this.X > xy2.X)
            {
                return 1;
            }
            else if (this.X < xy2.X)
            {
                return -1;
            }
            else if (this.Y > xy2.Y)
            {
                return 1;
            }
            else if (this.Y < xy2.Y)
            {
                return -1;
            }
            else
            {
                return 0;
            }
            
        }

    }
}
